package de.stefanocke.roo.wicket.page;

import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Service;
import org.springframework.roo.classpath.itd.ItdTypeDetailsProvidingMetadataItem;

import de.stefanocke.roo.wicket.RooPage;
import de.stefanocke.roo.wicket.Stereotypes;
import de.stefanocke.roo.wicket.base.ItdMetadataCreationParams;
import de.stefanocke.roo.wicket.base.ItdMetadataProviderBase;

@Component
@Service
public class PageMetadataProvider extends ItdMetadataProviderBase<PageMetadata, PageAnnotationValues> {

	public PageMetadataProvider() {
		super(RooPage.class, PageMetadata.class, PageAnnotationValues.class);
	}

	@Override
	protected ItdTypeDetailsProvidingMetadataItem getMetadataInternal(
			ItdMetadataCreationParams<PageAnnotationValues> cmcp) {

		return new PageMetadata(cmcp);
	}

	@Override
	protected String requiredStereotype() {
		return Stereotypes.BASE_PAGE;
	}

}
